<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<!--<link rel="stylesheet" type="text/css" href="../../template/css.css" media="all" />-->
<h:outputStylesheet name="css.css" library="css" />
<title>QueroTeto</title>

</h:head>
<h:body>
	<div id="corpo">
		<ui:include src="/template/topo.xhtml"/>
		<ui:include src="/template/menu.xhtml"/>
		<div id="conteudo">
			<div id="centro">		
				#{cadastroImovelBean.msg}		
				<h:form id="form">  
  
    				<p:panel header="Editar propaganda">
				    <h:panelGrid columns="3" cellpadding="5">
				    	
							<h:outputText value="Assunto: " />
							<p:inputText value="#{cadastroPropagandaBean.propaganda.assunto}"
								required="true" id="assunto" />
							<p:message for="assunto" display="icon" />

							<h:outputText value="Banner: " />
							<p:inputText value="#{cadastroPropagandaBean.propaganda.banner}"
								required="true" id="banner" />
							<p:message for="banner" display="icon" />

							<h:outputText value="Descricao: " />
							<p:inputMask
								value="#{cadastroPropagandaBean.propaganda.descricao}"
								id="descricao" />
							<p:message for="descricao" display="icon" />

							<h:outputText value="Email: " />
							<p:inputText value="#{cadastroPropagandaBean.propaganda.email}"
								required="true" id="email" />
							<p:message for="email" display="icon" />

							<h:outputText value="Link: " />
							<p:inputText value="#{cadastroPropagandaBean.propaganda.link}"
								required="true" id="link" />
							<p:message for="link" display="icon" />

							<h:outputText value="Responsavel: " />
							<p:inputText
								value="#{cadastroPropagandaBean.propaganda.responsavel}"
								required="true" id="responsavel" />
							<p:message for="responsavel" display="icon" />

							<h:outputText value="Telefone: " />
							<p:inputText
								value="#{cadastroPropagandaBean.propaganda.telefone}"
								mask="(99) 9999-9999" required="true" id="telefone" />
							<p:message for="telefone" display="icon" />


							<h:outputText value="Tipo: " />
							<p:selectOneRadio id="tipo"
								value="#{cadastroPropagandaBean.propaganda.tipo}">
								<f:selectItem itemLabel="Banner Lateral" itemValue="1" />
								<f:selectItem itemLabel="Banner principal" itemValue="2" />
								<f:selectItem itemLabel="Slide" itemValue="3" />
							</p:selectOneRadio>
							<p:message for="tipo" display="icon" />
            			<p:commandButton value="cancelar" type="submit" action="#{cadastroPropagandaBean.cancelar}" ajax="false" immediate="true"/>  
            			<p:commandButton value="Salvar" type="submit" action="#{cadastroPropagandaBean.atualizar}" ajax="false"/>
            			
            			<h:inputHidden value="#{cadastroPropagandaBean.propaganda.id}" id="id"/>  
  
  			      </h:panelGrid>  
    			</p:panel>  
			</h:form>  
			</div>	
			<div id="direita" align="center">
				
			</div>
		</div>
		<div id="both" align="center"></div>
		<ui:include src="/template/rodape.xhtml"/>
	</div>
</h:body>
</html>